<?php
class Zend_View_Helper_DrawMenu extends Zend_View_Helper_Abstract
{
	protected $ft;
	public function __construct()
	{
    	$this->ft = true;
	}
	public function Draw($Array,$Prefix = '')
	{

		if (  count($Array)  ) 
		{
			
			foreach ($Array as $Value)
			{
				    echo '<div class="moduletable_menu"><div class="menu_title"><h3>' . $Value['Name'] . '</h3></div>';
                if( isset($Value['sub']) && count($Value['sub']) ) 
                {
                    $ArraySub = $Value['sub'];
                    echo '<ul class="menu">'; 
                	foreach($ArraySub as $Value2)
                	{
                        echo "<li class='item4'><a href='" . $this->view->baseUrl("view/list-{$Value2['ID']}.html") . "'><span>{$Value2['Name']}</span></a></li>";            		
                	}                	
                	echo '</ul>';
                }
                echo "</div>"; 
			}
		}
	}
	
	public function drawMenu($Menu)
	{
       $this->Draw($Menu);
	}
}